<template>
  <div class="kanjia">
    <go-back title="砍价列表"></go-back>
    <div v-for="(item,i) in arr " :key="i" class="bargin">
      <shop :godds="item"></shop>
    </div>
  </div>
</template>

<script>
import goBack from "@/components/goBack/goBack";
import shop from "@/components/shop/shop";
import { getBarGin } from "../../utils/api/home";
export default {
  name: "",
  data() {
    return {
      arr: [],
    };
  },
  components: { goBack, shop },
  created() {
    getBarGin().then((res) => {
      this.arr = res.data
    });
  },
  mounted() {},
  methods: {},
};
</script>

<style lang='scss' scoped>
.kanjia {
  width: 100%;
  height: 100%;
  overflow: auto;
  overflow-x: hidden;
  /deep/.bargin {
    width: 100%;
    height: 2.6rem;
    display: flex;
    background-color: #fff;
    .left {
      width: 3rem;
      /deep/img {
        width: 100%;
        height: 100%;
        border-radius: 4px;
        margin: 0.2rem 0 0 0.4rem;
      }
    }
    .right {
      width: 4.4rem;
      font-size: 0.3rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      .p2 {
        margin-bottom: 0.4rem;
      }
      p {
        padding: 0.2rem 0 0 0.6rem;
        .minPrice {
          color: red;
          font-weight: 700;
        }
      }
      .price,
      .p1 {
        width: 100%;
        display: flex;
        text-align: center;
        padding: 0.2rem 0 0 0.6rem;
        span {
          flex: 1;
        }
      }
    }
  }
}
</style>